import request from '@/utils/request'

/**
 * #######################################   班级选课开放时间   #####################################################
 */
export function classTimePage(query) {
  return request({
    url: '/xuanxiu/class-time/page',
    method: 'get',
    params: query
  })
}

export function classTimeCreate(data) {
  return request({
    url: '/xuanxiu/class-time/add',
    method: 'post',
    data
  })
}

export function classTimeUpdate(data) {
  return request({
    url: '/xuanxiu/class-time/add',
    method: 'post',
    data
  })
}

export function classTimeDelete(data) {
  return request({
    url: '/xuanxiu/class-time/del',
    method: 'get',
    params: data
  })
}

/**
 * #######################################   选修课 课程   #####################################################
  */
export function coursePage(query) {
  return request({
    url: '/xuanxiu/course/page',
    method: 'get',
    params: query
  })
}

export function courseCreate(data) {
  return request({
    url: '/xuanxiu/course/add',
    method: 'post',
    data
  })
}

export function courseUpdate(data) {
  return request({
    url: '/xuanxiu/course/add',
    method: 'post',
    data
  })
}

export function courseDelete(data) {
  return request({
    url: '/xuanxiu/course/del',
    method: 'get',
    params: data
  })
}

/**
 * #######################################   选修班级信用学分   #####################################################
 */
export function scoreClassPage(query) {
  return request({
    url: '/xuanxiu/score-class/page',
    method: 'get',
    params: query
  })
}

export function scoreClassCreate(data) {
  return request({
    url: '/xuanxiu/score-class/add',
    method: 'post',
    data
  })
}

export function scoreClassUpdate(data) {
  return request({
    url: '/xuanxiu/score-class/add',
    method: 'post',
    data
  })
}

export function scoreClassDelete(data) {
  return request({
    url: '/xuanxiu/score-class/del',
    method: 'get',
    params: data
  })
}

/**
 * #######################################   选修学生信用学分   #####################################################
 */
export function scoreStudentPage(query) {
  return request({
    url: '/xuanxiu/score-student/page',
    method: 'get',
    params: query
  })
}

export function scoreStudentCreate(data) {
  return request({
    url: '/xuanxiu/score-student/add',
    method: 'post',
    data
  })
}

export function scoreStudentUpdate(data) {
  return request({
    url: '/xuanxiu/score-student/add',
    method: 'post',
    data
  })
}

export function scoreStudentDelete(data) {
  return request({
    url: '/xuanxiu/score-student/del',
    method: 'get',
    params: data
  })
}

export function scoreStudentCreditscoreUpdate(data) {
  return request({
    url: '/xuanxiu/score-student/creditscore-update',
    method: 'post',
    data
  })
}

export function scoreStudentShouldscoreUpdate(data) {
  return request({
    url: '/xuanxiu/score-student/shouldscore-update',
    method: 'post',
    data
  })
}

/**
 * #######################################   选修学生信用学分 变化记录   #####################################################
 */
export function scoreStudentChangePage(query) {
  return request({
    url: '/xuanxiu/score-student-change/page',
    method: 'get',
    params: query
  })
}

export function scoreStudentChangeCreate(data) {
  return request({
    url: '/xuanxiu/score-student-change/add',
    method: 'post',
    data
  })
}

export function scoreStudentChangeUpdate(data) {
  return request({
    url: '/xuanxiu/score-student-change/add',
    method: 'post',
    data
  })
}

export function scoreStudentChangeDelete(data) {
  return request({
    url: '/xuanxiu/score-student-change/del',
    method: 'get',
    params: data
  })
}

/**
 * #######################################   选修课课表   #####################################################
 */
export function timetablePage(query) {
  return request({
    url: '/xuanxiu/timetable/page',
    method: 'get',
    params: query
  })
}

export function timetableCreate(data) {
  return request({
    url: '/xuanxiu/timetable/add',
    method: 'post',
    data
  })
}

export function timetableUpdate(data) {
  return request({
    url: '/xuanxiu/timetable/add',
    method: 'post',
    data
  })
}

export function timetableDelete(data) {
  return request({
    url: '/xuanxiu/timetable/del',
    method: 'get',
    params: data
  })
}

/**
 * #######################################   选修课课表 报名学生   #####################################################
 */
export function timetableUserPage(query) {
  return request({
    url: '/xuanxiu/timetable-user/page',
    method: 'get',
    params: query
  })
}

// 初始化课程用户
export function timetableUsreInit(data) {
  return request({
    url: '/xuanxiu/timetable-user/init-user',
    method: 'post',
    params: data
  })
}
export function timetableUsreIn(data) {
  return request({
    url: '/xuanxiu/timetable-user/user-in',
    method: 'post',
    params: data
  })
}
export function timetableUsreOut(data) {
  return request({
    url: '/xuanxiu/timetable-user/user-out',
    method: 'post',
    params: data
  })
}

